// © 2009 Microsoft Corporation.  All rights reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace Microsoft.InformationSecurity.ISRM.TaskManagment.Classes
{
    /// <summary>
    /// Represents a single notification schedule either fixed or recurring.
    /// </summary>
    public class Notification
    {
        /// <summary>
        /// ID of the notification schedule
        /// </summary>
        public int ID
        {
            get;
            set;
        }

        /// <summary>
        /// NotificationContent of the notification schedule
        /// </summary>
        public NotificationContent NotificationContent
        {
            get;
            set;
        }

        /// <summary>
        /// Schedule that is sent weekly Weekly schedule type
        /// </summary>
        public FrequencyType FrequencyType
        {
            get;
            set;
        }

        /// <summary>
        /// Is this a recurring notification
        /// </summary>
        public bool IsRecurring
        {
            get;
            set;
        }

        /// <summary>
        /// Recurring duration used to specify number of days or weeks
        /// </summary>
        public int Frequency
        {
            get;
            set;
        }

        /// <summary>
        /// Flag to specify a combination of weekdays.
        /// </summary>
        public DaysOfWeek DayOfWeek
        {
            get;
            set;
        }

        /// <summary>
        /// User who last updated the notification schedule
        /// </summary>
        public string LastUpdatedBy
        {
            get;
            set;
        }

        /// <summary>
        /// Date and time when the schedule was updated
        /// </summary>
        public DateTime LastUpdatedDate
        {
            get;
            set;
        }

        /// <summary>
        /// Is the notification sent before the due date
        /// </summary>
        public bool IsBeforeDueDate
        {
            get;
            set;
        }

        /// <summary>
        /// Mail Address to send the notification
        /// </summary>
        public Collection<NotificationRecipient> Recipients
        {
            get;
            set;
        }

        /// <summary>
        /// Subject of the notification
        /// </summary>
        public string Subject
        {
            get;
            set;
        }

        /// <summary>
        /// Day of the month to send the notfication.
        /// </summary>
        public int DayOfMonth
        {
            get;
            set;
        }

        /// <summary>
        /// Ends notification after specified number
        /// </summary>
        public int Occurances
        {
            set;
            get;
        }

        /// <summary>
        /// Date when this notification was last processed by the engine
        /// </summary>
        public DateTime LastProcessedDate
        {
            set;
            get;
        }

        /// <summary>
        /// Used by engine to determine if the notification is due for processing.
        /// </summary>
        public bool IsDueForProcessing
        {
            set;
            get;
        }
    }
}
